package model;

/**
 * 
 * @author Mads Nielsen
 */
public class Item {

    private String itemNo;
    private String name;
    private double price;
    private ItemGroup group;
    private int minStock;
    
    public Item() {
    }

    /* Trivial getter and setters */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {

        this.itemNo = itemNo;

    }
    
    public double getTotalPrice() {
        return getPrice();
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getMinStock() {
        return minStock;
    }

    public void setMinStock(int minStock) {
        this.minStock = minStock;
    }

    /**
     * @return the group
     */
    public ItemGroup getGroup() {
        return group;
    }

    /**
     * @param group the group to set
     */
    public void setGroup(ItemGroup group) {
        this.group = group;
    }
    
    public boolean equals(Item item) {
        return this.itemNo.equals(item.getItemNo());
    }
    
}
